<!DOCTYPE html>
<html>
<html xmlns:th="http://thymeleaf.org">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

	<title>地址管理</title>
	<link rel="stylesheet" th:href="@{/layui/css/layui.css}">
	<script  th:src="@{/layui/layui.js}"></script>

	<link href="/before/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
	<link href="/before/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">

	<link href="/before/css/personal.css" rel="stylesheet" type="text/css">
	<link href="/before/css/addstyle.css" rel="stylesheet" type="text/css">
	<script src="/before/AmazeUI-2.4.2/assets/js/jquery.min.js" type="text/javascript"></script>
	<script src="/before/AmazeUI-2.4.2/assets/js/amazeui.js"></script>

</head>

<body>
<!--头 -->
<header>
	<article>
		<div class="mt-logo">
			<!--顶部导航条 -->
			<div class="am-container header">
				<ul class="message-l">
					<div class="topMessage">
						<div class="menu-hd">
							<a th:href="@{/user/details}" target="_top" class="h" style="color: orangered;">欢迎您,<span
									th:text="${session.session_user.userName}"></span></a>
						</div>
					</div>
				</ul>
				<ul class="message-r">
					<div class="topMessage home">
						<div class="menu-hd"><a href="#" target="_top" class="h">商城首页</a></div>
					</div>
					<div class="topMessage my-shangcheng">
						<div class="menu-hd MyShangcheng"><a href="#" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
					</div>
					<div class="topMessage mini-cart">
						<div class="menu-hd"><a id="mc-menu-hd" href="#" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h">0</strong></a></div>
					</div>
					<div class="topMessage favorite">

						<div class="menu-hd"><a href="#" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a></div>
					</div>
				</ul>
			</div>

			<!--悬浮搜索框-->

			<div class="nav white">
				<div class="logoBig">
					<li><img src="/before/images/logobig.png" /></li>
				</div>

				<div class="search-bar pr">
					<a name="index_none_header_sysc" href="#"></a>
					<form>
						<input id="searchInput" name="index_none_header_sysc" type="text" placeholder="搜索" autocomplete="off">
						<input id="ai-topsearch" class="submit am-btn" value="搜索" index="1" type="submit">
					</form>
				</div>
			</div>

			<div class="clear"></div>
		</div>
		</div>
	</article>
</header>

<div class="nav-table">
	<div class="long-title"><span class="all-goods">全部分类</span></div>
	<div class="nav-cont">
		<ul>
			<li class="index"><a href="#">首页</a></li>
			<li class="qc"><a href="#">闪购</a></li>
			<li class="qc"><a href="#">限时抢</a></li>
			<li class="qc"><a href="#">团购</a></li>
			<li class="qc last"><a href="#">大包装</a></li>
		</ul>
		<div class="nav-extra">
			<i class="am-icon-user-secret am-icon-md nav-user"></i><b></b>我的福利
			<i class="am-icon-angle-right" style="padding-left: 10px;"></i>
		</div>
	</div>
</div>
<b class="line"></b>

<div class="center">
	<div class="col-main">
		<div class="main-wrap">

			<div class="user-address">
				<!--标题 -->
				<div class="am-cf am-padding">
					<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">地址管理</strong> / <small>Address&nbsp;list</small></div>
				</div>
				<hr/>
				<ul class="am-avg-sm-1 am-avg-md-3 am-thumbnails">

					<li class="user-addresslist defaultAddr" th:each="user:${user}">
						<span class="new-option-r"><i class="am-icon-check-circle"></i>默认地址</span>
						<p class="new-tit new-p-re">
							<span class="new-txt" th:text="${user.userName}"></span>
							<span class="new-txt-rd2" th:text="${user.phone}" ></span>
						</p>
						<div class="new-mu_l2a new-p-re">
							<p class="new-mu_l2cw">
								<span class="title">地址：</span>
								<span class="province">湖北</span>省
								<span class="city">武汉</span>市
								<span class="dist">洪山</span>区
								<span class="street" th:text="${user.address}"></span></p>
						</div>
						<div class="new-addr-btn">
<!--							<a href="#"><i class="am-icon-edit"></i>编辑</a>-->
<!--							<span class="new-addr-bar">|</span>-->
<!--							<a href="javascript:void(0);" onclick="delClick(this);"><i class="am-icon-trash"></i>删除</a>-->
						</div>
					</li>

					<li class="user-addresslist" th:each="ladr : ${list}">
						<span class="new-option-r"><i class="am-icon-check-circle"></i><a href="javascript:void(0)" th:onclick="Default([[${ladr.adrId}]])">设为默认 </a></span>
						<p class="new-tit new-p-re">
							<span class="new-txt" th:text="${ladr.userName}"></span>
							<span class="new-txt-rd2" th:text="${ladr.phone}"></span>
						</p>
						<div class="new-mu_l2a new-p-re">
							<p class="new-mu_l2cw">
								<span class="title">地址：</span>
								<span class="province">湖北</span>省
								<span class="city">武汉</span>市
								<span class="dist">洪山</span>区
								<span class="street" th:text="${ladr.address}"></span></p>
						</div>
						<div class="new-addr-btn">
							<a href="javascript:void(0)" th:onclick="Edit([[${ladr.adrId}]])"><i class="am-icon-edit"></i>编辑 </a>
<!--							<a href="#"><i class="am-icon-edit"></i>编辑</a>-->
							<span class="new-addr-bar">|</span>
<!--							<a href="javascript:void(0);" onclick="delClick(this);"><i class="am-icon-trash"></i>删除</a>-->
							<a th:href="@{'/useradr/deleteadr1?id='+${ladr.adrId}}"><i class="am-icon-trash"></i>删除</a>
						</div>
					</li>
<!--					<li class="user-addresslist">-->
<!--						<span class="new-option-r"><i class="am-icon-check-circle"></i>设为默认</span>-->
<!--						<p class="new-tit new-p-re">-->
<!--							<span class="new-txt">小叮当</span>-->
<!--							<span class="new-txt-rd2">159****1622</span>-->
<!--						</p>-->
<!--						<div class="new-mu_l2a new-p-re">-->
<!--							<p class="new-mu_l2cw">-->
<!--								<span class="title">地址：</span>-->
<!--								<span class="province">湖北</span>省-->
<!--								<span class="city">武汉</span>市-->
<!--								<span class="dist">洪山</span>区-->
<!--								<span class="street">雄楚大道666号(中南财经政法大学)</span></p>-->
<!--						</div>-->
<!--						<div class="new-addr-btn">-->
<!--							<a href="#"><i class="am-icon-edit"></i>编辑</a>-->
<!--							<span class="new-addr-bar">|</span>-->
<!--							<a href="javascript:void(0);" onclick="delClick(this);"><i class="am-icon-trash"></i>删除</a>-->
<!--						</div>-->
<!--					</li>-->
				</ul>
				<div class="clear"></div>
				<a class="new-abtn-type" data-am-modal="{target: '#doc-modal-1', closeViaDimmer: 0}">添加新地址</a>
				<!--例子-->
				<div class="am-modal am-modal-no-btn" id="doc-modal-1">

					<div class="add-dress">

						<!--标题 -->
						<div class="am-cf am-padding">
							<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">新增地址</strong> / <small>Add&nbsp;address</small></div>
						</div>
						<hr/>

						<div class="am-u-md-12 am-u-lg-8" style="margin-top: 20px;">
							<form class="am-form am-form-horizontal" th:action="@{/useradr/newadduseradr1}">

								<div class="am-form-group">
									<label for="user-name" class="am-form-label">收货人</label>
									<div class="am-form-content">
										<input type="text" id="user-name" name="user-name" placeholder="收货人">
									</div>
								</div>

								<div class="am-form-group">
									<label for="user-phone" class="am-form-label">手机号码</label>
									<div class="am-form-content">
										<input id="user-phone" name="user-phone" placeholder="手机号必填">
									</div>
								</div>

								<div class="am-form-group">
									<label for="user-phone" class="am-form-label">所在地</label>
									<div class="am-form-content address">
										<select data-am-selected>
											<option value="a">浙江省</option>
											<option value="b">湖北省</option>
										</select>
										<select data-am-selected>
											<option value="a">温州市</option>
											<option value="b">武汉市</option>
										</select>
										<select data-am-selected>
											<option value="a">瑞安区</option>
											<option value="b">洪山区</option>
										</select>
									</div>
								</div>

								<div class="am-form-group">
									<label for="user-intro" class="am-form-label">详细地址</label>
									<div class="am-form-content">
										<textarea class="" rows="3" id="user-intro" name="user-intro" placeholder="输入详细地址"></textarea>
										<small>100字以内写出你的详细地址...</small>
									</div>
								</div>

								<div class="am-form-group theme-poptit">
									<div class="am-u-sm-9 am-u-sm-push-3">
										<input class="am-btn am-btn-danger" type="submit" value="保存"/>
										<div class="am-btn am-btn-danger close">取消</div>
									</div>
								</div>
							</form>
						</div>

					</div>

				</div>

			</div>

			<script type="text/javascript">
				$(document).ready(function() {
					$(".new-option-r").click(function() {
						$(this).parent('.user-addresslist').addClass("defaultAddr").siblings().removeClass("defaultAddr");
					});

					var $ww = $(window).width();
					if($ww>640) {
						$("#doc-modal-1").removeClass("am-modal am-modal-no-btn")
					}

				})
			</script>

			<div class="clear"></div>

		</div>
		<!--底部-->
		<div class="footer">
			<div class="footer-hd">
				<p>
					<a href="#">恒望科技</a>
					<b>|</b>
					<a href="#">商城首页</a>
					<b>|</b>
					<a href="#">支付宝</a>
					<b>|</b>
					<a href="#">物流</a>
				</p>
			</div>
			<div class="footer-bd">
				<p>
					<a href="#">关于恒望</a>
					<a href="#">合作伙伴</a>
					<a href="#">联系我们</a>
					<a href="#">网站地图</a>
					<em>© 2015-2025 Hengwang.com 版权所有</em>
				</p>
			</div>
		</div>
	</div>

	<aside class="menu">
		<ul>
			<li class="person active">
				<a href="index.html">个人中心</a>
			</li>
			<li class="person">
				<a href="#">个人资料</a>
				<ul>
					<li><a th:href="@{/user/details}">个人信息</a></li>
					<!--                    <li><a href="pay.html">收货地址</a></li>-->



					<li> <a  th:href="@{/useradr/list}"  STYLE="color:GREEN">收货地址</a></br></li>
				</ul>
			</li>
			<li class="person">
				<a href="#">我的交易</a>
				<ul>
					<li><a th:href="@{/page/ordermanagement}">订单管理</a></li>
				</ul>
			</li>
			<li class="person">
				<a href="#">我的资产</a>
				<ul>
					<li><a th:href="@{/order/orderlist}">账单明细</a></li>
				</ul>
			</li>

			<li class="person">
				<a href="#">我的小窝</a>
				<ul>
					<!--                    <li><a href="foot.html">足迹</a></li>-->
					<li><a th:href="@{/foot/footlist}">足迹</a></li>
					<!--                    <li><a href="comment.html">评价</a></li>-->
					<li><a th:href="@{/message/usermeslist}">评价</a></li>
				</ul>
			</li>

		</ul>

	</aside>
</div>

<script type="">

	function Edit(adrId) {
		// var adrId=data.type;
		//alert(adrId);
		layui.use("layer",function () {
			var layer=layui.layer;
			layer.open({
				type: 2,
				title: '编辑信息',
				maxmin: true,
				shadeClose: true, //点击遮罩关闭层
				area : ['400px' , '400px'],
				content: '/useradr/editadr?id=' +adrId
				// /useradr/editadr?id='+${ladr.adrId}}
				//'/product/product_edit?pId='+pId
			})
		})
	}

	function Default(adrId) {
		// var adrId=data.type;
		//alert(adrId);
		layui.use("layer",function () {
			var layer=layui.layer;
			layer.open({
				type: 2,
				title: '编辑信息',
				maxmin: true,
				shadeClose: true, //点击遮罩关闭层
				area : ['400px' , '400px'],
				content: '/user/editadr?id=' +adrId
				// /useradr/editadr?id='+${ladr.adrId}}
				//'/product/product_edit?pId='+pId
			})
		})
	}



	// (function show() {
	// 	alert($("#ot").val())
	// })
</script>

</body>

</html>